<?php include 'black-admin-css-js.php'; ?>

<div id="container"> <!-- Container -->
    <div id="header"> <!-- Header -->
        <div id="title">
            <span>Thực phẩm ba miền</span>
        </div>
        <div class="logged">
            <p>Xin chào, <a href="/quanly/logout/" title="<?php echo $loginName; ?>"><?php echo $loginName; ?></a>!</p>
        </div>
    </div>
    <!-- Sidebar -->
    <div id="sidebar"> 
        <div class="sidebox">
            <span class="stitle" id="left-header">Danh Mục</span>
            <!-- Navigation begins here -->
            <div id="navigation">
                <div class="sidenav">
                    <div class="navhead"><span onclick="AdminController.manageProduct();">Sản phẩm</span></div>
                    <div class="subnav">
                        <ul class="submenu">
                            <?php if ($perProduct != '' || $isMaster == 1) {
 ?>
                                <li>
                                    <a class="cpointer noselect" id="menu_1" onclick="AdminController.getListProduct();">Danh sách sản phẩm</a>
                                </li>
<?php } ?>

<?php if ($permissionProductCategory != '' || $isMaster == 1) { ?>
                                <li><a class="cpointer noselect" id="menu_2" onclick="AdminController.manageCategory();">Danh mục sản phẩm</a></li>
<?php } ?>

<?php if ($permissionProductSpecs != '' || $isMaster == 1) { ?>
                                <li><a class="cpointer noselect" id="menu_2" onclick="AdminController.manageSpecs();">Thông số kỹ thuật</a></li>
<?php } ?>

<?php if ($perProductMaker != '' || $isMaster == 1) { ?>
                                <li><a class="cpointer noselect" id="menu_3" onclick="AdminController.manageProductMaker();">Hãng sản xuất</a></li>
<?php } ?>
                        </ul>
                    </div>

                    <div class="navhead"><span onclick="AdminController.manageNews();">Tin tức</span></div>
                    <div class="subnav">
                        <ul class="submenu">
<?php if ($permissionNews != '' || $isMaster == 1) { ?>
                                <li><a class="cpointer noselect"  id="menu_3" onclick="AdminController.getListNews();">Danh sách tin tức</a></li>
                            <?php } ?>
<?php if ($permissionNewsCategory != '' || $isMaster == 1) { ?>
                                <li><a class="cpointer noselect" id="menu_4" onclick="AdminController.manageNewsCategory();">Danh mục tin tức</a></li>
<?php } ?>
                        </ul>
                    </div>

                    <div class="navhead"><span onclick="AdminController.manageOrder();">Đơn hàng</span></div>
                    <div class="subnav">
                        <ul class="submenu">
<?php if ($permissionOrder != '' || $isMaster == 1) { ?>
                                <li><a class="cpointer noselect" onclick="AdminController.getProductOrder('new', 1);">Đơn hàng mới</a></li>
                                <li><a class="cpointer noselect" onclick="AdminController.getProductOrder('isProcess', 1);">Đơn hàng đã xử lý</a></li>
                                <li><a class="cpointer noselect" onclick="AdminController.getProductOrder('isWait', 1);">Đơn hàng đang chờ xử lý</a></li>
<?php } ?>
                        </ul>
                    </div>
<?php if ($permissionProductPrice != '' || $isMaster == 1) { ?>
                                <div class="navhead"><span>Download</span></div>
                                <div class="subnav">
                                    <ul class="submenu">
                                        <li><a class="cpointer noselect">Danh sách file download</a></li>
                                        <li><a class="cpointer noselect">Danh mục download</a></li>
                                    </ul>
                                </div>
<?php } ?>
                            <div class="navhead"><span onclick="AdminController.manageSlider();">Quản lý slider</span></div>
                            <div class="subnav">
                                <ul class="submenu">
                                    <li><a class="cpointer noselect" onclick="AdminController.getSlider('active', 1);">Slider đang kích hoạt</a></li>
                                    <li><a class="cpointer noselect" onclick="AdminController.getSlider('delete', 1);">Slider đã xóa</a></li>
                                </ul>
                            </div>
<?php if ($isMaster == 1) { ?>
                                <div class="navhead"><span onclick="AdminController.manageMember();">Thành viên</span></div>
                                <div class="subnav">
                                    <ul class="submenu">
                                        <li><a class="cpointer noselect" onclick="AdminController.getListMember();">Danh sách thành viên</a></li>
                                    </ul>
                                </div>
<?php } ?>
                            <div class="navhead"><span>Quản lý người dùng</span></div>
                            <div class="subnav">
                                <ul class="submenu">
                                    <li><a class="cpointer noselect" onclick="AdminController.changePassword();">Thay đổi mật khẩu</a></li>
                                </ul>
                            </div>
                                <div class="navhead"><span onclick="AdminController.manageCustomer();">Quản lý khách hàng</span></div>
                                <div class="subnav">
                                    <ul class="submenu">
<!--                                        <li><a class="cpointer noselect" onclick="AdminController.getListCustomer();">Danh sách khách hàng</a></li>-->
                                        <li><a class="cpointer noselect" onclick="AdminController.getListCustomerCTV();">Danh sách cộng tác viên</a></li>
                                        <li><a class="cpointer noselect" onclick="AdminController.statisticsProfit();">Thống kê doanh số</a></li>
                                        <li><a class="cpointer noselect" onclick="AdminController.getMyCtv();">Cộng tác viên của tôi</a></li>
                                        <li><a class="cpointer noselect" onclick="AdminController.getMyProfit();">Doanh số của tôi</a></li>
<!--                                        <li><a class="cpointer noselect">Khách hàng của tôi</a></li>-->
<!--                                        <li><a class="cpointer noselect">Nhà phân phối của tôi</a></li>-->
                                    </ul>
                                </div>

                            <div class="navhead"><span onclick="AdminController.manageCommon();">Quản lý chung</span></div>
                            <div class="subnav">
                                <ul class="submenu">
                                    <li><a class="cpointer noselect" onclick="AdminController.manageIntroduction();">Giới thiệu</a></li>
                                    <li><a class="cpointer noselect" onclick="AdminController.manageGeneral('currency');">Tỷ giá ngoại tệ</a></li>
                                </ul>
                            </div>
                            
                            <div class="navhead"><span>Mặc cả thuê</span></div>
                            <div class="subnav">
                                <ul class="submenu">
                                    <li><a class="cpointer noselect" onclick="AdminController.showCustomerProductLink('all');">Link khách hàng</a></li>
                                    <li><a class="cpointer noselect" onclick="AdminController.showCustomerProductLink();">Yêu cầu kinh doanh gọi</a></li>
                                    <li><a class="cpointer noselect" onclick="AdminController.showCustomerProductLink();">Yêu cầu gửi báo giá</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <!--        <div class="sidebox">
                            <span class="stitle">Additional Panel</span>
                            <div id="datepicker"></div>

                        </div>-->
            </div><!-- END Sidebar -->
            <div id="main"> <!-- Main, right side content -->
                <div id="content"> <!-- Content begins here -->


                    <div id="maincontentcenter" class="content-box">
                        <div class="content-box-header">
                            <div id="manage-new-pland"></div>
                        </div>

                        <div class="content-box-content">
                            <div id="list-content-category" class="hide">
                                <div id="list_cat_0"></div>
                                <div id="list_cat_1"></div>
                                <div id="list_cat_2"></div>
                                <div id="list_cat_3"></div>
                                <div id="list_cat_4"></div>
                            </div>
                            <div id="add-new-category" class="hide">
<?php include 'editor-add-sub-category.php'; ?>
                        </div>
                        <div id="show-add-sub-cat" class="hide"></div>
                        <div id="list-sub-cat" class="hide"></div>
                        <div id="list-product" class="hide"></div>
                        <div id="list-news" class="hide"></div>
                        <div id="editor" class="hide">
<?php include 'editor-add-product.php' ?>
                        </div>
                        <div id="editor-add-news" class="hide">
<?php include 'editor-add-news.php' ?>
                        </div>
                        <div id="list-news-category" class="hide">
                            <div id="news_cat_item_0"></div>
                            <div id="news_cat_item_1"></div>
                            <div id="news_cat_item_2"></div>
                            <div class="clear"></div>
                            <div id="product_cat_option"></div>
                        </div>
                        <div id="addCategoryNews" class="hide"></div>
                        <div id="list_member" class="hide"></div>
                        <div id="form_add_member" class="hide">
<?php include 'editor-add-member.php'; ?>
                        </div>
                        <div id="list-product-maker" class="hide"></div>
                        <div id="list_order_content" class="hide"></div>
                        <div id="view_detail_order" class="hide"></div>
                        <div id="list_slider" class="hide"></div>
                        <div id="form_add_slider" class="hide">
<?php include 'editor-add-slider.php'; ?>
                        </div>
                        <div id="manage_curency" class="hide">
                            <form name="frmManageCurrency" id="frmManageCurrency" onsubmit="AdminController.saveCurrency(); return false;">
                                Tỷ giá hiện tại<input class="w250p" type="text" name="common_currency" id="common_currency">
                                <input type="button" class="submit" value="Cập nhật" onclick="AdminController.saveCurrency();">
                            </form>
                        </div>
                        <div id="customer_link" class="hide"></div>
                        <div id="customer_link_detail" class="hide"></div>
                        <div id="customer_list_customer" class="hide"></div>
                        <div id="ctv_list_my_ctv" class="hide"></div>
                        <div id="ctv_view_detail" class="hide"></div>
                        <div id="customer_list_CTV" class="hide"></div>
                        <div id="editor_add_my_ctv" class="hide">
                            <?php include 'ctv_form_add_my_ctv.php';?>
                        </div>
                        <div id="kd_list_my_profit" class="hide"></div>
                        <div id="kd_list_my_product" class="hide"></div>
                        <div id="kd_view_detail_my_product" class="hide"></div>
                        <div id="kd_add_my_product" class="hide">
<?php include 'kd_add_my_product.php'; ?>
                        </div>
                        <div id="kd_list_my_customer" class="hide"></div>
                        <div id="change_pasword" class="hide">
                            <form id="frmChangePass" name="frmChangePass">
                                <table cellpadding="0" cellspacing="0" width="100%">
                                    <col width="30%">
                                    <col width="70%">
                                    <tr>
                                        <td>
                                            Nhập mật khẩu cũ
                                        </td>
                                        <td>
                                            <input type="password" name="member_old_pass" id="member_old_pass" class="w200p">
                                            <span id="member_old_pass_error" class="validate_error" style="display: none;"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Nhập mật khẩu mới
                                        </td>
                                        <td>
                                            <input type="password" name="member_new_pass" id="member_new_pass" class="w200p">
                                            <span id="member_new_pass_error" class="validate_error" style="display: none;"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Nhập lại mật khẩu mới
                                        </td>
                                        <td>
                                            <input type="password" name="member_retype_new_pass" id="member_retype_new_pass" class="w200p">
                                            <span id="member_retype_new_pass_error" class="validate_error" style="display: none;"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td>
                                            <div style="padding-top: 10px;">
                                                <input type="button" value="Đổi mật khẩu" class="cpointer submit" onclick="AdminController.savePassword();">
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </form>
                        </div>
                        <div id="manageIntroduction" class="hide">
                            <?php include 'editor_add_introduction.php';?>
                        </div>
                    </div>

                </div>
                <div class="clear"> </div>

                <!-- Paginator end -->
            </div> <!-- END Content -->

        </div>
        <div class="sidebar-right">
            <div class="sidebox-right">
                <div id="list-category"></div>
            </div>
        </div>
        <div class="clear"> </div>
        <div id="footer">
            <p>Copyright <a rel="dofollow" target="_blank" href="">Thực phẩm ba miền</p>
        </div>
    <?php include 'overlayAddSubCategory.php'; ?>
    <?php include 'overlayAddCategoryInfo.php'; ?>
    <?php include 'overlayAddSubCategoryInfo.php'; ?>
    <?php include 'overlayAddSubCategoryInfoLevel3.php'; ?>
    <?php include 'overlayAddNewsSubCategory.php'; ?>
    <?php include 'overlay-confirm.php'; ?>
<?php include 'overlay-confirm-yes-no.php'; ?>
                        </div>
                        <!-- END Container -->


<script type="text/javascript">
 var tooltipObj = new DHTMLgoodies_formTooltip();
tooltipObj.setTooltipPosition('right');
tooltipObj.setPageBgColor('#EEEEEE');
tooltipObj.setTooltipCornerSize(10);
tooltipObj.initFormFieldTooltip();
</script>
<script type="text/javascript">
                            var perProduct = <?php echo (isset($perProduct)) ? $perProduct : "''"; ?>;
                            var perProductAdd = <?php echo (isset($perProductAdd)) ? $perProductAdd : "''"; ?>;
                            var perProductEdit = <?php echo (isset($perProductEdit)) ? $perProductEdit : "''"; ?>;
                            var perProductDelete = <?php echo (isset($perProductDelete)) ? $perProductDelete : "''"; ?>;

                            var permissionProductCategory = <?php echo (isset($permissionProductCategory)) ? $permissionProductCategory : "''"; ?>;
                            var perProductCategoryAdd = <?php echo (isset($perProductCategoryAdd)) ? $perProductCategoryAdd : "''"; ?>;
                            var perProductCategoryEdit = <?php echo (isset($perProductCategoryEdit)) ? $perProductCategoryEdit : "''"; ?>;
                            var perProductCategoryDelete = <?php echo (isset($perProductCategoryDelete)) ? $perProductCategoryDelete : "''"; ?>;

                            var permissionNews = <?php echo (isset($permissionNews)) ? $permissionNews : "''"; ?>;
                            var perNewsAdd = <?php echo (isset($perNewsAdd)) ? $perNewsAdd : "''"; ?>;
                            var perNewsEdit = <?php echo (isset($perNewsEdit)) ? $perNewsEdit : "''"; ?>;
                            var perNewsDelete = <?php echo (isset($perNewsDelete)) ? $perNewsDelete : "''"; ?>;

                            var permissionNewsCategory = <?php echo (isset($permissionNewsCategory)) ? $permissionNewsCategory : "''"; ?>;
                            var perNewsCategoryAdd = <?php echo (isset($perNewsCategoryAdd)) ? $perNewsCategoryAdd : "''"; ?>;
                            var perNewsCategoryEdit = <?php echo (isset($perNewsCategoryEdit)) ? $perNewsCategoryEdit : "''"; ?>;
                            var perNewsCategoryDelete = <?php echo (isset($perNewsCategoryDelete)) ? $perNewsCategoryDelete : "''"; ?>;

                            var permissionOrder = <?php echo (isset($permissionOrder)) ? $permissionOrder : "''"; ?>;
                            var perOrderEdit = <?php echo (isset($perOrderEdit)) ? $perOrderEdit : "''"; ?>;
                            var perOrderDelete = <?php echo (isset($perOrderDelete)) ? $perOrderDelete : "''"; ?>;

                            var perProductMaker = <?php echo (isset($perProductMaker)) ? $perProductMaker : "''"; ?>;
                            var perProductMakerAdd = <?php echo (isset($perProductMakerAdd)) ? $perProductMakerAdd : "''"; ?>;
                            var perProductMakerEdit = <?php echo (isset($perProductMakerEdit)) ? $perProductMakerEdit : "''"; ?>;
                            var perProductMakerDelete = <?php echo (isset($perProductMakerDelete)) ? $perProductMakerDelete : "''"; ?>;

                            var permissionProductSpecs = <?php echo (isset($permissionProductSpecs)) ? $permissionProductSpecs : "''"; ?>;
                            var perProductSpecsAdd = <?php echo (isset($perProductSpecsAdd)) ? $perProductSpecsAdd : "''"; ?>;
                            var perProductSpecsEdit = <?php echo (isset($perProductSpecsEdit)) ? $perProductSpecsEdit : "''"; ?>;
                            var perProductSpecsDelete = <?php echo (isset($perProductSpecsDelete)) ? $perProductSpecsDelete : "''"; ?>;

                            var permissionProductPrice = <?php echo (isset($permissionProductPrice)) ? $permissionProductPrice : "''"; ?>;
                            var perProductPriceAdd = <?php echo (isset($perProductPriceAdd)) ? $perProductPriceAdd : "''"; ?>;
                            var perProductPriceEdit = <?php echo (isset($perProductPriceEdit)) ? $perProductPriceEdit : "''"; ?>;
                            var perProductPriceDelete = <?php echo (isset($perProductPriceDelete)) ? $perProductPriceDelete : "''"; ?>;

                            var isMaster = <?php echo (isset($isMaster)) ? $isMaster : "''"; ?>
    
</script>
